//
//  PicCollectionViewCell.m
//  GXKPhotos
//
//  Created by 乐善街 on 16/6/18.
//  Copyright © 2016年 tianchuanshangwu. All rights reserved.
//

#import "PicCollectionViewCell.h"

@implementation PicCollectionViewCell


-(void)loadPhotoData:(GXKPhoto *)assetItem
{
    if ([assetItem isKindOfClass:[GXKPhoto class]]) {
        
        [[PHImageManager defaultManager] requestImageForAsset:assetItem.asset targetSize:CGSizeMake(200, 200) contentMode:PHImageContentModeAspectFit options:nil resultHandler:^(UIImage *result, NSDictionary *info){
            self.picImageView.image = result;
            
        }];
        
    }
}


//记录按钮选中和非选中的状态
-(void)selectBtnStage:(NSMutableArray *)selectArray existence:(GXKPhoto *)photo
{
    if ([selectArray containsObject:photo]) {
        _isSelectedButton.selected = YES;
        [_isSelectedButton setImage:[UIImage imageNamed:@"select_yes"] forState:UIControlStateNormal];
    }else{
        _isSelectedButton.selected = NO;
        [_isSelectedButton setImage:[UIImage imageNamed:@"select_no"] forState:UIControlStateNormal];
    }
}

- (void)awakeFromNib {
    
    [super awakeFromNib];
    
}

@end
